-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for 'url' to --porcelain
to output the URL instead of attachment ID
#182
Add support for 'url' to --porcelain
to output the URL instead of attachment ID
#182
Conversation
…tput ONLY the URL, instead of attachment ID or verbose descriptions.
Let's use |
…ge URLs being returned by `wp_get_attachment_url()`. Improved tests, including non-image file for thoroughness.
One more question before I commit the last fixes: What I've built here is an alternative to the One idea would be to allow the With With Does that make sense? Or should we limit this to be simply an alternative to the |
@justinmaurerdotdev I don't think we need to change the default output. However, I have a better idea for a flag:
This is how it would work:
We don't need to support all fields right now, but this approach gives us the flexibility to apply the pattern across other commands. |
OK, yeah. That's perfect! Will push those changes shortly. |
…the porcelain output to use additional fields. 'ID' (default) and 'url' currently supported.
--porcelain
to output the URL instead of attachment ID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work on this! I made some minor stylistic changes with 0ca8360
Good deal. Changes look good. Thanks! |
This addresses #94
Should output ONLY the URL, instead of attachment ID or verbose descriptions.
Is that the best name for the flag?
Should we also provide an option for showing the URL in the verbose output?
Related wp-cli/wp-cli#5832